SmartFTP FTP Library
IFTPConnection::GetFileSize Method

Retrieves the size of a specified file.

IDL
HRESULT GetFileSize(
    [in] BSTR file, 
    [out, retval] ULONGLONG* retval
);

The client sends a SIZE command to get the file size. Prior to the SIZE command the method sets the data transfer type according to the DataTransferType data member. This is necessary because the result of the SIZE command may depend on the server data transfer type. 

 

If the LastReplyCode property is not equal to 2xx or if the server returns an unexpected value in the SIZE reply (e.g. a negative size value) then the function returns an error.

What do you think about this topic? Send feedback!
Copyright (c) by SmartSoft Ltd. All rights reserved.